package com.estronger.pull_to_refresh_expandablelist;

import android.content.Context;
import android.content.SharedPreferences;

//import com.qoocc.news.base.NewsApplication;

public class ReadPrefrenceUtil {

    private static final String FILENAME = "pull_to_refresh.xml";

    public static boolean getIsRead(Context context, String orignalID, String channelType) {
        SharedPreferences sp = context.getSharedPreferences(FILENAME, Context.MODE_PRIVATE);
        return sp.getBoolean(channelType + "_" + orignalID, false);
    }

    public static void setRead(Context context, String orignalID, String channelType) {
        SharedPreferences sp = context.getSharedPreferences(FILENAME, Context.MODE_PRIVATE);
        sp.edit().putBoolean(channelType + "_" + orignalID, true).commit();
    }


    public static void saveUpdateTimeState(String channelType, String timeText) {
//		SharedPreferences.Editor editor = NewsApplication.getContext().getSharedPreferences(FILENAME, Context.MODE_PRIVATE).edit();
//		editor.putString(channelType, timeText);
//		editor.commit();
    }


    public static String getUpdateTimeState(String func) {
//		SharedPreferences sp = NewsApplication.getContext().getSharedPreferences(FILENAME, Context.MODE_PRIVATE);
//        return sp.getString(func, "");
        return "";
    }
}
